using Ocelot.DependencyInjection;
using Ocelot.Middleware;
using Ocelot.Provider.Polly;

namespace netcore_gateway
{
    public class Program
    {
        public static void Main(string[] args)
        {

            var builder = WebApplication.CreateBuilder(args);
            builder.Configuration.AddJsonFile("configuration.json", optional: true, reloadOnChange: true);

            // Add services to the container.
           // builder.Services.AddAuthorization();

            builder.Services.AddOcelot().AddPolly();

            var app = builder.Build();

            // Configure the HTTP request pipeline.

            //app.UseAuthorization();


            app.UseOcelot();
            app.Run();
        }
    }
}
